import sys
import os
import logging

cur_file_path, filename = os.path.split(os.path.abspath(__file__))
sys.path.append(f"{cur_file_path}/../")

from l0n0lnet.transform import ChaCha20, get_random_bytes

key = get_random_bytes(32)
nonce = get_random_bytes(8)
data = b'123123123'

enc1 = ChaCha20.new(key=key, nonce=nonce)
enc2 = ChaCha20.new(key=key, nonce=nonce)

d1 = enc1.encrypt(data)
print(d1)
d2 = enc2.decrypt(d1)
print(d2)

